<template>
  <div class="box">
    <div class="header">
      <span class="iconfont icon-fanhui" @click="back()"></span>
      <div class="title">消息</div>
    </div>
    <div class="main">
      <van-cell
      class="cell"
        is-link
        title="互动消息"
        link-type="navigateTo"
        url="/pages/my/news2"
      />
      <van-cell
      class="cell"
        is-link
        title="系统消息"
        link-type="navigateTo"
        url="/pages/my/news3"
      />
    </div>
  </div>
</template>

<script>
import "../../static/iconfont/font_ed6w5zgn1gn/iconfont.css";
export default {
  methods: {
    back() {
      uni.navigateBack();
    },
  },
};
</script>

<style lang='scss'>
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  .header {
    width: 100%;
    height: 200rpx;
    background: linear-gradient(90deg, #0272f0, #36a2fe);
    display: flex;
    align-items: center;
    position: relative;
    top:0;
    position:sticky;
    span {
      position: absolute;
      left: 40rpx;
      top: 50%;
      transform: translate(0, -50%);
      color: #fff;
    }
    .title {
      width: 100%;
      text-align: center;
      color: #fff;
    }
  }
  .main{
    width: 100%;
    height: 227rpx;
    background: #eee;
    .cell:nth-child(2){
      display: block;
      margin: 10rpx 0;
    }
  }
}
</style>